# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-wolframalpha
pkgver=5.0.0
pkgrel=4
pkgdesc="Wolfram|Alpha 2.0 API client"
url="https://github.com/jaraco/wolframalpha"
arch="noarch"
license="MIT"
depends="
	py3-jaraco.context
	py3-jaraco.itertools
	py3-xmltodict
	python3
	"
makedepends="
	py3-setuptools
	py3-setuptools_scm
	py3-toml
	"
checkdepends="
	py3-pytest
	py3-pytest-black
	py3-pytest-cov
	py3-pytest-flake8
	"
source="https://pypi.python.org/packages/source/w/wolframalpha/wolframalpha-$pkgver.tar.gz"
builddir="$srcdir/wolframalpha-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# pmxbot requires unpackaged dependencies
	# test_invalid_app_id hangs on ppc64le
	pytest -v \
		--ignore wolframalpha/test_pmxbot.py \
		--ignore wolframalpha/pmxbot.py \
		--deselect wolframalpha/test_client.py::test_invalid_app_id
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="12935fa205f998dc8847467abf6c8a0aae4ec4df5c65faf27c57791bb92392d05e8610f9ae7cf68401167b6140a8eb9706d5bda6324b1b39b9a59571dc4d1e91  wolframalpha-5.0.0.tar.gz"
